﻿<extend name="Common/public"/>

<block name="content">


<title>添加用户</title>
</head>
<body>
<div class="pd-20">
  <form action="" method="post" class="form form-horizontal" id="form-member-add" enctype="multipart/form-data">
    <div class="row cl">
        <label class="form-label col-1"><i class="Hui-iconfont">&#xe60d;</i></label>
        <div class="formControls col-10">
          <input id="" name="name" type="text" placeholder="账户" class="input-text size-L">
        </div>
      </div>
      <div class="row cl">
        <label class="form-label col-1"><i class="Hui-iconfont">&#xe60e;</i></label>
        <div class="formControls col-10">
          <input id="" name="password" type="password" placeholder="密码" class="input-text size-L">
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-10 col-offset-1">
          <input class="input-text size-L" name="code" type="text" placeholder="验证码" style="width:150px;">
          <img src="{:U('Login/getVerify')}"> <a id="kanbuq" href="javascript:;">看不清，换一张</a> </div>
      </div>
      <div class="row">
        <div class="formControls col-8 col-offset-1">
          <label for="online">
            <input type="checkbox" name="online" id="online" value="1">
            使我保持登录状态</label>
        </div>
      </div>
      <div class="row">
        <div class="formControls col-8 col-offset-3">
          <input name="" type="submit" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
          <input name="" type="reset" onclick="quxiao()" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
        </div>
      </div>
  </form>
</div>
</div>


<include file="Common/js"/>

<script type="text/javascript">
function quxiao(){
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.close(index);
}
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$(function(){
		$('#kanbuq').click(function(){
			$(this).prev().prop('src',$(this).prev().prop('src')+'?'+Math.random());
		});
	})
	$("#form-member-add").ajaxForm({
		type:'post',
		dataType: "json",
		url:'{:(U("Login/login"))}',
		success:function(data){
			if(data.status == 1){
				var index = parent.layer.getFrameIndex(window.name);
				parent.location.reload();
				parent.layer.close(index);
			}else{
				layer.msg(data.msg,{icon:5,time:1000});
			}
		}
	});
});
</script>
</body>
</block>